package com.yxq.mdt.app.modules.shoppingcart.model;


import com.yxq.mdt.app.base.RespBase;
import com.yxq.mdt.app.modules.shoppingcart.bean.CartBean;
import com.yxq.mdt.app.net.API;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface CartApi {

    /**
     * 商品-购物车列表
     *
     * @return
     */
    @POST(API.HOST_BASE_URL + "api/cart/list")
    @FormUrlEncoded
    Observable<RespBase<CartBean>> cartList(@Field("access_token") String access_token);

    /**
     * 商品-删除购物车商品
     *
     * @return
     */
    @GET(API.HOST_BASE_URL + "api/cart/delete")
    Observable<RespBase<String>> cartDelete(@Query("access_token") String access_token, @Query("cart_id_list") String cart_id_list);

    /**
     * 商品-修改购物车数据
     *
     * @return
     */
    @POST(API.HOST_BASE_URL + "api/cart/cart-edit")
    @FormUrlEncoded
    Observable<RespBase<String>> cartEdit(@Field("access_token") String access_token, @Field("list") String list);


}
